@extends('admin.layout')
@section('content')

      
            
      <!-- BEGIN MAIN CONTENT -->
      
      
      <section id="main-content">
             
    <!-- BEGIN WRAPPER  -->
        <section class="wrapper">
                     <section class="panel">
                        <header class="panel-heading">
                           <span class="label label-primary"><b>用户添加</b></span>
                           <span class="tools pull-right">
                           <a href="javascript:;" class="fa fa-chevron-down"></a>
                           <a href="javascript:;" class="fa fa-times"></a>
                           </span>
                        </header>

                           
                         @if (count($errors) > 0)
                           <div class="box-body">
                              <div class="alert alert-danger alert-dismissable">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                                <h4><i class="fa fa-warning"></i> 用户添加失败:</h4>
                        
                            
                                <ul>
                                    @foreach ($errors->all() as $error)
                                        <li>{{ $error }}</li>
                                    @endforeach
                                </ul>
                             </div>
                            </div><!-- /.box-body -->
                        @endif  

                        @if(session('info')) 

                            <div class="box-body">
                              <div class="alert alert-danger alert-dismissable">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                                <h4><i class="fa fa-warning"></i> {{ session['info'] }}!</h4>
                        @endif          

                        <div class="panel-body">
                           <form  action="/admin/user/insert" method="post">
                            {{ csrf_field() }}
                              <div class="form-group">
                                 <label for="InputUsername">用户名</label>
                                 <input class="form-control" id="InputUsername" placeholder="请输入6~18位用户名" type="text" name="username"　value="{{ old('username') }}" }}>
                              </div>
                              <div class="form-group">
                                 <label for="InputEmail1">邮箱</label>
                                 <input class="form-control" id="InputEmail1" placeholder="请输入您常用邮箱地址" type="email" name='email' value="{{ old('email') }}">
                              </div>
                              <div class="form-group">
                                 <label for="leInputPassword1">密码</label>
                                 <input class="form-control" id="InputPassword1" placeholder="请输入密码" type="password" name="password" value="{{ old('password') }}">
                              </div>
                              <div class="form-group">
                                 <label for="InputPassword2">确认密码</label>
                                 <input class="form-control" id="InputPassword1" placeholder="请保持两次密码的密码一致" type="password" name="repassword" value="{{ old('repassword') }}">
                              </div>
                              <div class="form-group">
                                 <label for="InputToken">密码令牌</label>
                                 <input class="form-control" id="InputUsername" placeholder="请输入token以方便找回密码" type="text" name="Token" value="{{ old('Token') }}">
                              </div>
                              <div class="form-group">
                                 <label for="InputStatus">用户状态</label>
                                 <div class="radio">
                                       <label>
                                       <input name="status" id="optionsRadios1" value="0" checked="checked" type="radio">
                                       禁用
                                       </label>
                                    </div>
                                    <div class="radio">
                                       <label>
                                       <input name="status" id="optionsRadios2" value="1" type="radio">
                                       启用
                                       </label>
                                    </div>
                              </div>                                   
                              <button type="submit" class="btn btn-info">注册新的管理员</button>
                           </form>
                        </div>
                     </section>
               </section>
    <!-- END WRAPPER  -->
      </section>
      <!-- END MAIN CONTENT -->
           

@endsection